/*
 * @Description: 卡车
 * @Author: Aroma
 * @Date: 2024-09-19 19:55:47
 * @LastEditors: Aroma
 * @LastEditTime: 2024-09-19 19:55:50
 * @别瞎看: 你个无脑牛马
 */
class Truck extends Automobile {
    private String type; // 车辆类型：小型、中型、大型

    public Truck(String brand, String plateNumber, String type) {
        super(brand, plateNumber);
        this.type = type;
    }

    @Override
    public double getRent() {
        switch (type) {
            case "小型":
                return 300;
            case "中型":
                return 350;
            case "大型":
                return 500;
            default:
                throw new IllegalArgumentException("Invalid truck type: " + type);
        }
    }
}